<template>
    <div>
        <h3>register</h3>
        <!-- vue2路由跳转使用方式 -->
        <router-link to="/login">标签-login</router-link>
        <button @click="goLogin">js-login</button>
    </div>
</template>

<script>
export default {
    methods: {
        goLogin() {
            this.$router.push('/login?name=李四&age=20')
        }
    },
};
</script>

<style scoped></style>
